import Vue from 'vue'
import Router from 'vue-router'
import Home from "../views/home/Home";
import Cart from "../views/cart/Cart";
import ProFile from "../views/proflie/ProFile";
import Category from "../views/category/Category";
import Detail from "../views/detail/Detail";

Vue.use(Router)

const routes = [
  {
    path: "",
    redirect: "/home"
  },
  {
    path: "/home",
    component: Home
  }, {
    path: "/cart",
    component: Cart
  },
  {
    path: "/profile",
    component: ProFile
  },
  {
    path: "/category",
    component: Category
  },
  {
    path: "/detail/:iid",
    component: Detail,
  }
]

export default new Router({
  routes,
  mode: "history"
})
